package com.system.entity.manage;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;

@ApiModel("系统日志对象")
@TableName("sys_log")
public class SysLog {

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("请求url")
    @TableField("req_url")
    private String reqUrl;


    @ApiModelProperty("请求参数")
    @TableField("req_params")
    private String reqParams;

    @ApiModelProperty("请求包名")
    @TableField("package_name")
    private String packageName;

    @ApiModelProperty("方法名称")
    @TableField("method_name")
    private String methodName;

    @ApiModelProperty("返回码")
    @TableField("rsp_code")
    private Integer rspCode;

    @ApiModelProperty("返回消息")
    @TableField("rsp_msg")
    private String rspMsg;

    @ApiModelProperty("业务类型")
    @TableField("business_type")
    private String businessType;

    @ApiModelProperty("操作名称")
    @TableField("operation_name")
    private String operationName;

    @ApiModelProperty("请求ip")
    @TableField("ip")
    private String ip;

    @ApiModelProperty("操作用户id")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty("操作用户名")
    @TableField("username")
    private String username;

    @ApiModelProperty("操作时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty("操作结束时间")
    @TableField("end_time")
    private Date endTime;

    @ApiModelProperty("操作耗时(ms)")
    @TableField("execute_time")
    private long executeTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getReqUrl() {
        return reqUrl;
    }

    public void setReqUrl(String reqUrl) {
        this.reqUrl = reqUrl;
    }

    public String getReqParams() {
        return reqParams;
    }

    public void setReqParams(String reqParams) {
        this.reqParams = reqParams;
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public Integer getRspCode() {
        return rspCode;
    }

    public void setRspCode(Integer rspCode) {
        this.rspCode = rspCode;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public String getOperationName() {
        return operationName;
    }

    public void setOperationName(String operationName) {
        this.operationName = operationName;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public long getExecuteTime() {
        return executeTime;
    }

    public void setExecuteTime(long executeTime) {
        this.executeTime = executeTime;
    }

    public String getRspMsg() {
        return rspMsg;
    }

    public void setRspMsg(String rspMsg) {
        this.rspMsg = rspMsg;
    }

    @Override
    public String toString() {
        return "SysLog{" +
                "id=" + id +
                ", reqUrl='" + reqUrl + '\'' +
                ", reqParams='" + reqParams + '\'' +
                ", packageName='" + packageName + '\'' +
                ", methodName='" + methodName + '\'' +
                ", rspCode=" + rspCode +
                ", businessType='" + businessType + '\'' +
                ", operationName='" + operationName + '\'' +
                ", ip='" + ip + '\'' +
                ", userId='" + userId + '\'' +
                ", username='" + username + '\'' +
                ", createTime=" + createTime +
                ", endTime=" + endTime +
                ", executeTime=" + executeTime +
                '}';
    }
}
